import requests
url = 'https://news.baidu.com/widget?id=LocalNews&ajax=json&t=1732761945667'
headers = {
    "user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
}
params={
"id": 'LocalNews',
"ajax": "json",
"t": "1732761945667"
}

req = requests.get(url,headers=headers,params=params)
req.encoding = "utf-8"

req_json = req.json()
print(type(req_json))
for i in range(0,8):
    print(req_json["data"]["LocalNews"]["data"]["rows"]["first"][i]["title"])




